cmake_minimum_required(VERSION 3.0.0)
project(JRPC-HTTP VERSION 0.1.0)

include_directories(CommLib/inc)
add_subdirectory(CommLib/src)

include_directories(JRPC/inc)
add_subdirectory(JRPC/src)

add_executable(JRPC-HTTP main.c)

find_package (Threads)  #添加线程库

target_link_libraries(JRPC-HTTP JRPC CommLib ${CMAKE_THREAD_LIBS_INIT})
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)

SET(CMAKE_BUILD_TYPE "Debug")
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g2 -ggdb")
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")
